package factory.abstractfactory;

/**
 * @author wcj
 * @Date 2021/6/20 22:27
 * @Version 1.0
 */
public class OperationFactory extends AbstractFactory {
    @Override
    public Operation getOperation(String s) {
        if (s.equals("+")) {
            return new OperationAdd();
        } else if (s.equals("-")) {
            return new OperationSub();
        } else if (s.equals("*")) {
            return new OperationMultiply();
        } else if (s.equals("/")) {
            return new OperationDivide();
        } else {
            return null;
        }
    }

    @Override
    public Color getColors(String s) {
        return null;
    }
}
